Ektron CMS400.Net Reference
The SocialBar server control allows users of a community Web site to bookmark colleagues, community groups, and content. The following table explains the details.
Item being bookmarked |
Description |
---|---|
Users |
Sends colleague requests Removes colleagues when a user visits another user’s profile page |
Group |
Join and leave community group Invite others to join group |
Content |
Add or remove content and URLs from a user’s Favorites. See Also: Favorites Server Control |
The Social Bar control is also used to bookmark Web pages with Social Bookmarking services, such as Digg.com or del.icio.us. By default, Digg.com and del.icio.us are loaded in the Items property of the server control. See Also: Items Property
In addition, the Social Bar control can print or email a Web page, and invite non-site users to become members of the site. Clicking Invite links to a Web page that hosts the Invite server control. See Also: Invite Server Control.
See Also: Adding a URL to Your Favorites via the Favorites Control
You can allow users to add a Web page’s URL to their Favorites when they click Add to Favorites on the Social Bar. Typically, you would do this if more than one content item appears on a Web page, but you want only one Social Bar control on the page.
The image below shows a web page with several content items. A Social Bar control is associated with each one. In this example, when a user clicks Add to Favorites, he adds the associated content item to his Favorites.
In the second image, one Social Bar appears on the Web page with several content items. In this example, if a user clicks Add to Favorites on the Social Bar, he adds the Web page’s URL to his Favorites.
To allow users to add a URL to their Favorites from the SocialBar server control, follow these steps.
1. Drag and drop a SocialBar server control on a Web form.
2. Set the DefaultObjectID property to 0 (zero).
3. Leave the DynamicObjectParameter property blank.
4. If it is not already there, copy the comma-separated list of items from the Items property to the Addto item property.
5. Set the ObjectType property to Content.
Users can send private messages to another user or the community group administrator from the Social Bar control. To enable this feature, follow these steps.
1. Drop a SocialBar server control on a user’s profile or community group’s page.
2. Set the ObjectType property to User or Group.
3. Add either PrivateMessageUser or PrivateMessageAdmin to Items property.
- Use PrivateMessageUser
to let a user send a message to the user whose profile is being viewed.
- Use PrivateMessageAdmin
to let a user send a message to the group administrator.
4. In the MessagingUrl property, identify a page that contains the Messaging server control. See Also: Messaging Server Control
5. Make sure the DynamicObjectParameter is set, if necessary.
See Also: Items Property
You can allow site visitors to use Twitter to tweet their current browsing location. You do this by adding the Twitter item to the list of parameters in the SocialBar’s Items
property.
After the item is added, a Twitter icon and link appear in the Social Bar. When a user clicks the link, Twitter is launched. After a user logs into his Twitter account, his current browsing location appears in the “What are you doing?” status box. The user can then click Twitter’s Update button to post the status.
To allow users to tweet the URL they are currently browsing, follow these steps.
1. Drag and drop a SocialBar server control on a Web form.
2. Make sure the DefaultObjectID property is set to 0 (zero).
3. Leave the DynamicObjectParameter property blank.
4. If it is not already there, add the Twitter item to the comma-separated list in the Items property.
5. Set the ObjectType property to Content, User or Group, depending on the type of page you are editing.
The SocialBar server control properties are described in this table.
Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.
Property |
Description |
Data Type |
Authenticated |
Indicates if you are logged in to the CMS Explorer and can use it to browse to Content, Collections, etc. See Also: Working with Ektron CMS400.NET Server Controls |
String |
CacheInterval |
Sets the amount of time the server control’s data is cached. The default is 0 (zero). This is the amount of time, in seconds, a control’s data is cached. For example, if you want to cache the data for five minutes, set this property to 300 (three hundred). See Also: Caching with Server Controls |
Double |
DefaultObjectID |
The default object ID for this control to use when there is no matching dynamic parameter value passed. If you set this property set to 0 (zero) and leave the DynamicObjectParameter blank, the social bar can be used to add Web pages to your favorites. |
Long |
DisplayXslt |
Determines how the Social Bar items are displayed on the page. Enter the path to a custom XSLT file. The path can be relative or absolute. Warning! If you specify an |
String |
DoInitFill |
By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event. You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown. |
Boolean |
DynamicObjectParameter |
Gets or sets the QueryString parameter to read a object ID dynamically. To use the default object ID, leave blank. |
String |
Hide |
Used to hide output of the control in design time and run time. True = Hide control False = Display control |
Boolean |
IncludeIcons |
Select whether icons are displayed next to each item. True = Display icons next to each item. False = Do not display icons next to each item. |
Boolean |
The URL to the Invite server control’s Web page. Two variables used within the URL. {0} - represents the object ID {1} - represents the object type The link must have both variables. The Web form can be relative or absolute. Below is an example. invitepage.aspx?id={0}&type={1} |
String |
|
Items |
A comma separated list of items that you want to appear on the Social Bar. See Items Property for information. |
String |
Language |
Set a language for viewing the server control. This property shows results in design-time (in Visual Studio) and at run-time (in a browser). |
Integer |
MarkupLanguage |
Identify the template markup file that controls the display of the server control. For example, mymarkup.ekml. If the *.ekml file is located in the same folder as the Web form containing the server control, just enter its name. Otherwise, the path to the file can be relative or absolute. See Also: Controlling Output with Ektron Markup Language |
String |
MessagingUrl |
The Web page that hosts the Messaging server control. This property is used when either Note: If a value appears in the ek_RedirectFromLoginKeyName key in the web.config file, the user is returned to the original URL after sending the message. By default, this value is RedirectUrl. If you remove this value and do not add another, the person sending a message sees a note stating “Your message has been sent.” |
String |
ObjectType |
The type of object to which this control is assigned. Choices are: Content - this control is assigned to content. User - control assigned to an individual Group -control assigned to a community group Data Type: Ektron.Cms.Common.EkEnumeration.CMSSocialBarTypes |
|
Stylesheet |
Specify the path to a style sheet for use with the server control. The location can be relative or absolute. Leave blank to use the default style sheet. Warning! If you enter a valid EkML file at the MarkupLanguage property, the Stylesheet property is ignored. |
String |
SuppressWrapperTags |
Suppresses the output of the span/div tags around the control. The default is False. True - Suppress wrap tags. False - Allow wrap tags. |
Boolean |
WrapTag |
Allows a developer to specify a server control’s tag. The default is Span. Span - The <span> tag is used to designate an inline portion of an HTML document as a span element. Div - The <div> tag is used when you want to apply attributes to a block of code. Custom - Allows you to use a custom tag. |
String |
The Items property controls which items appear in the Social Bar. Below is a list of items that can appear in the Social Bar.
Item |
Description |
Addto |
If this control is associated with a user, the Addto item appears as: - Add a Colleague - if user is viewing another user’s profile page and can add them as a colleague. - Cancel Colleague Request - if user is viewing another user’s profile page who he asked to be a colleague but the user has not yet accepted. - Remove From Colleagues - if user is viewing a current colleague’s profile page. If the control is associated with a community group, the Addto item appears as: - Join Group - if user visits a community group that he has not joined. - Leave Group - if user already belongs to a community group. - Cancel Request to Join - if user has tried join a restricted group and has not yet been accepted. If the control is associated with content, the Addto item appears as: - Add to Favorites - if user views content that is not in their Favorites. - Remove Favorites - if user views content that is in their Favorites. |
Invite |
A link to the Web page that contains the Invite server control. This control allows you to invite people to register on the site and become a colleague. Warning! For the Invite item to be active, you must enter a link to the page hosting the Invite control into the InviteURL property. See Also: InviteURL. |
GroupInvite |
Opens a dialog that invites colleagues or people who are not registered on the site to join the group. |
|
Email this Web page. Clicking this item launches a user’s email with the subject and body loaded with the information about the content, user or community group. |
Appears as Digg It. Launches Digg.com, a social bookmarking service. |
|
Appears as Bookmark It. Launches del.icio.us, a social bookmarking service. |
|
Appears as Facebook. Launches Facebook, a social network service. |
|
Appears as Google It. Launches Google’s social bookmarking service. |
|
Appears as Furl It. Launches Furl, a social bookmarking service. |
|
Appears as Technorati. Launches Technorati, a social bookmarking service. |
|
|
Launches Twitter, a social network service, which allows users to communicate with other Twitter users. If the Twitter link is clicked, and a user logs in to a Twitter account, a link to the current page is inserted into the Status box. See Also: Tweeting the URL a User is Currently Browsing |
Yahoo |
Appears as Yahoo! It. Launches Yahoo’s social bookmarking service. |
|
Print the Web page. |
PrivateMessageUser |
Creates a link that allows you to send a Private Message to a user. See Also: Private Messaging from the Social Bar |
PrivateMessageAdmin |
Creates a link that allows you to send a Private Message to a community group’s administrator. See Also: Private Messaging from the Social Bar |